<template>
	<view class="_company_item">
		<view class="u-p-l-32 u-p-r-32 ">
			<view class="f-s-16 f-w-b u-line-1">{{data.name}}</view>
			<view class="u-flex u-flex-items-center u-m-t-12">
				<status bgColor="rgba(22,119,255,0.1)" color="#1677FF" text="经发认证"></status>
				<status class="u-m-l-12" bgColor="rgba(22,119,255,0.1)" color="#1677FF" text="公安已认证"></status>
			</view>

			<view class="u-m-t-24 f-s-14 u-flex u-flex-self-start">
				<view class="_title u-tips-color">所在位置</view>
				<view>{{data.address}}</view>
			</view>
			<view class="u-m-t-24 f-s-14 u-flex">
				<view class="_title u-tips-color">负责人</view>
				<view>{{data.legal}}</view>
			</view>
			<view class="u-m-t-24 f-s-14 u-flex">
				<view class="_title u-tips-color">联系方式</view>
				<view>{{ data.urgentContactTel }}</view>
			</view>
			<view class="u-m-t-24 f-s-14 u-flex">
				<view class="_title u-tips-color">注册时间</view>
				<view>{{data.addTime}}</view>
			</view>
		</view>
		<up-line margin="24rpx 0 "></up-line>
		<view class="u-flex u-flex-end u-flex-items-center u-p-l-32 u-p-r-32">
			<view class="u-m-r-24">
				<up-button text="单位详情" :customStyle="{
					width: '176rpx',
					height: '56rpx',
					border: '1rpx solid #E5E5E5',
					background: '#fff',
					borderRadius: '8rpx',
					fontSize: '28rpx',
					color: 'color: rgba(0,0,0,0.65)'
				}" @click="toCompanyInfo"></up-button>
			</view>

			<view>
				<up-button text="人员管理" :customStyle="{
					width: '176rpx',
					height: '56rpx',
					background: '#1677FF',
					borderRadius: '8rpx',
					fontSize: '28rpx',
					color: '#FFFFFF'
				}" @click="toPeople"></up-button>
			</view>
		</view>
	</view>
</template>

<script setup>

	import Status from '@/components/common/Status.vue'
	const props = defineProps({
		data: Object,
	})
	const toCompanyInfo = () => {
		uni.navigateTo({
			url: '/subPackages/company/info?id=' + props.data.id + '&name=' + props.data.name,
		})
	}
	const toPeople = () => {
		uni.navigateTo({
			url: '/subPackages/company/user_list?endId=' + props.data.id + '&name=' + props.data.name,
		})
	}
	
</script>

<style lang="scss" scoped>
	._company_item {
		background: #FFFFFF;
		box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0, 0, 0, 0.05);
		border-radius: 16rpx;
		padding: 32rpx 0;
		margin-bottom: 24rpx;

		._title {
			min-width: 144rpx;
			width: 144rpx;
		}

	}
</style>